-- GENERATED SPELL FOR [Living Cyclone] --


function spell0_17160(pUnit, Event) --@Lightning Shield,n/a--
pUnit:FullCastSpellOnTarget(12550,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17160', 0, 1)
end

function spell1_17160(pUnit, Event) --@Magnetic Pull,n/a--
pUnit:FullCastSpellOnTarget(31705,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17160', 500, 1)
end

function Sorts_17160(pUnit, Event)
local choix_sorts_17160 = math.random(0, 1)
if choix_sorts_17160 == 0 then
pUnit:RegisterEvent('spell0_17160', 1, 1)
end
if choix_sorts_17160 == 1 then
pUnit:RegisterEvent('spell1_17160', 1, 1)
end
end

function mob17160_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17160', math.random(1500, 3000), 1)
end

function mob17160_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17160_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17160_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17160, 1, 'mob17160_Action')
RegisterUnitEvent(17160, 2, 'mob17160_Leave')
RegisterUnitEvent(17160, 3, 'mob17160_Kill')
RegisterUnitEvent(17160, 4, 'mob17160_Die')
